Heterogeneous agents (HANK) ============================ A heterogeneous-agent model (HANK, and more generally any incomplete-markets / Aiyagari-type economy) is authored in the ordinary ``.rs`` grammar with **three additional constructs**. RISE reads the annotated file and expands it into a plain Markov-switching DSGE; from that point the object behaves like any other model -- ``solve``, ``filter``, ``estimate``, ``forecast``, ``simulate``, ``irf`` and the decompositions all apply, and the heterogeneity composes with regime switching. A model file that uses **none** of these constructs is an ordinary representative-agent model and is parsed unchanged. The three constructs are: * ``@heterogeneity_axis(...)`` -- declare a dimension of the cross-section (a grid). * ``@endogenous(individual)`` -- declare the variables solved at the individual (per-grid-point) level. * ``@Agg(...)`` -- aggregate an individual expression across the cross-section. This chapter documents what each construct means and what it does. It is a parser-level interface: the model you write is the model that is solved. The solution itself is handled by RISE's standard perturbation machinery, with the cross-section treated as an extension of Reiter's method; that part is internal and not the subject of this chapter. .. contents:: :local: :depth: 2 Heterogeneity axes ------------------- Each dimension of the cross-section is declared with one line:: @heterogeneity_axis(name, size,